package cn.tedu.service;/**
 * @Author 金帮嘉诚 @Date 2021-07-19 星期一 20:46
 */
/*本类用于测试*/

import cn.tedu.mapper.EmpMapper;
import cn.tedu.pojo.Emp;
import cn.tedu.utils.MybatisUtil;
import org.apache.ibatis.session.SqlSession;
import org.springframework.stereotype.Service;

import java.util.List;

/**知识点*/
@Service
public class EmpServiceImpl implements EmpService{
    private EmpMapper empMapper =getEmpMapper();

    public EmpMapper getEmpMapper() {
        SqlSession session = MybatisUtil.getSession();
        EmpMapper mapper = session.getMapper(EmpMapper.class);
        return mapper;
    }

    @Override
    public List<Emp> getAll() {
        return empMapper.getAll();
    }
}
